package suites.integration {
	import org.flexunit.asserts.assertNotNull;
	import org.splink.library.queue.QEvent;

	/**
	 * <code>LibraryTest</code> assumes that there is a as3ds.swf within the sample/library folder
	 * which contains the as3ds library
	 * 
	 * @author Max Kugland
	 */
	public class LibraryTest extends AbstractIntegrationTest {

		[Test (async,order=1)]
		public function singleLibrary() : void {
			handleAsync(24000);
			
			var xml : XML = <resourcebundles defaultLocale="de_DE">
								<resourcebundle locale="de_DE" />
								<libraries path="../sample/library/">
									<library id="test" src="testlibrary.swf" filesize="1307" />
								</libraries>
							</resourcebundles>;
							
			createProcessor(xml, function(e : QEvent) : void {
				assertNotNull(new TestLibrary().test());
			}).start();
		}
		
		[Test (async,order=2)]
		public function sameSingleLibrary() : void {
			handleAsync(100);
			
			var xml : XML = <resourcebundles defaultLocale="de_DE">
								<resourcebundle locale="de_DE" />
								<libraries path="../sample/library/">
									<library id="test" src="testlibrary.swf" filesize="1307" />
								</libraries>
							</resourcebundles>;
							
			createProcessor(xml, function(e : QEvent) : void {
				assertNotNull(new TestLibrary().test());
			}).start();
		}
	}
}
